package com.totoro.controller.request;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author TOTORO
 * @date 2021/7/21 11:10
 */
@Controller
public class ErrorRequestController {

    @RequestMapping("/tmall_error")
    public String tmallError404(@RequestParam("t") String errorType){
        return "forward:/tmall_404.jsp";
    }

    @RequestMapping("/tmall_process_error")
    public String tmallErrorProcess(@RequestParam("errorType") String errorType, @RequestParam("errorMsg") String errorMsg, Model model){
        model.addAttribute("msg", errorMsg);
        return "forward:/tmall_process_error.jsp";
    }
}
